import request from '../utils/request';

export interface LoginResponse {
    token: string;
}

export const loginUser = async (username: string, password: string): Promise<LoginResponse> => {
    return await request({
        url: '/api/auth/login',
        method: 'post',
        data: { username, password },
    });
};